package com.yi.mall.demo.controller;

import com.yi.mall.common.utils.ResponseEnum;
import com.yi.mall.common.utils.Result;
import com.yi.mall.demo.pojo.UserLoginLog;
import com.yi.mall.demo.service.IUserUserLoginLogService;
import com.yi.mall.demo.service.Impl.UserInfoServiceImpl;
import com.yi.mall.demo.service.Impl.UserLoginLogServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.Serializable;
import java.lang.ref.PhantomReference;
import java.util.List;

@RestController
@RequestMapping("/LoginLog")
public class UserLoginLogController {
    @Autowired
    private UserLoginLogServiceImpl userLoginLogService;
    @GetMapping("/getAll")
    public Result<List> getAll(long id){
        List<UserLoginLog> userLoginLogs = userLoginLogService.selectByUserId(id);
        return  Result.success(ResponseEnum.SUCCESS,userLoginLogs);

    }


}
